import Vue from 'vue';
import Student from './student.vue';
import Teacher from './teacher.vue';
import auth from '../../Component/Auth/auth.js';
import qTextarea from '../../Directive/q-textarea';

Vue.use(require('vue-resource'));
Vue.use(require('vue-validator'));
Vue.http.options.emulateJSON = true;
Vue.directive('qTextarea', qTextarea);

var App = auth.getInfo().isTeacher ? Teacher : Student;
new Vue({
	el: 'body',
	components: { App }
});